package com.success.task.web.lucene.core;

import com.success.task.web.exceptions.LuceneException;
import com.success.task.web.lucene.data.SearchResult;
import com.success.task.web.lucene.interfaces.IndexHighLighterInterface;
import com.success.task.web.lucene.interfaces.SearchServiceInterface;
import com.success.task.web.lucene.interfaces.SearcherInterface;

public class DefaultIndexResearchImpl implements SearcherInterface {
	
	private SearchServiceInterface searchServiceImpl = null;
	
	private IndexHighLighterInterface highlighter = null;
	
	@Override
	public SearchResult search(String keywords,int page)  throws LuceneException {
		return searchServiceImpl.search(keywords,highlighter,page);
	}

	public void setSearchServiceImpl(SearchServiceInterface searchServiceImpl) {
		this.searchServiceImpl = searchServiceImpl;
	}

	public void setHighlighter(IndexHighLighterInterface highlighter) {
		this.highlighter = highlighter;
	}
	
}
